/******************************************************************************/
/* Files to Include                                                           */
/******************************************************************************/

#if defined(__XC)
#include <xc.h>         /* XC8 General Include File */
#elif defined(HI_TECH_C)
#include <htc.h>        /* HiTech General Include File */
#endif

#include <stdint.h>        /* For uint8_t definition */
#include <stdbool.h>       /* For true/false definition */
#include <stdio.h>

#include "system.h"        /* System funct/params, like osc/peripheral config */
#include "user.h"          /* User funct/params, such as InitApp */
#include "lcd.h"

/******************************************************************************/
/* User Global Variable Declaration                                           */
/******************************************************************************/

/* i.e. uint8_t <variable_name>; */

/******************************************************************************/
/* Main Program                                                               */
/******************************************************************************/
void main(void)
{
    /* Configure the oscillator for the device */
    ConfigureOscillator();

    /* Initialize I/O and Peripherals for application */
    InitApp();

    lcd_init();

    /*printf("1234567890ABCDEF1234567890ABCDEF");
    printf("0987654321FEDCBA0987654321FEDCBA");*/

   /* lcd_gotoXY(5,1);
    printf("#");*/
    
    ei();

    while(1)
    {
        unsigned short int val;
        __delay_ms(1000);
        lcd_cls();

        val = (TMR1H <<8) | TMR1L;

        printf("%u", val);


        {
        /* //   RC2=1;
                __delay_ms(50);
            RC2=0;
            __delay_ms(50);
           // printf("1");*/
        }
        /* TODO <INSERT USER APPLICATION CODE HERE> */
    }

}

